1include <gridfinity-rebuilt-openscad-main/gridfinity-rebuilt-lite.scad>
 2include <BOSL2/std.scad>
 3
 4/* [Setup Parameters] */
 5$fa = 8;
 6$fs = 0.25;
 7
 8/* [Shitfinity] */
 9shitfinity_top = false;
10shitfinity_bottom_padding = 10;
11shitfinity_top_padding = 10;
12shitfinity_inner_padding_thickness = 1;
13shitfinity_inner_padding = 4.5;
14
15/* [General Settings] */
16// number of bases along x-axis
17gridx = 1;
18// number of bases along y-axis
19gridy = 2;
20// bin height. See bin height information and "gridz_define" below.
21
22/* [Toggles] */
23// snap gridz height to nearest 7mm increment
24enable_zsnap = false;
25// how should the top lip act
26style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
27
28/* [Other] */
29// determine what the variable "gridz" applies to based on your use case
30gridz_define = 0; // [0:gridz is the height of bins in units of 7mm increments - Zack's method,1:gridz is the internal height in millimeters, 2:gridz is the overall external height of the bin in millimeters]
31// the type of tabs
32style_tab = 5; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
33
34/* [Base] */
35style_hole = 0; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
36// only cut magnet/screw holes at the corners of the bin to save uneccesary print time
37only_corners = false;
38// number of divisions per 1 unit of base along the X axis. (default 1, only use integers. 0 means automatically guess the right division)
39div_base_x = 0;
40// number of divisions per 1 unit of base along the Y axis. (default 1, only use integers. 0 means automatically guess the right division)
41div_base_y = 0;
42// thickness of bottom layer
43bottom_layer = 1;
44
45// Implementation
46divx = 1;
47divy = 1;
48
49if (!shitfinity_top){
50union(){
51difference(){
52gridfinityLite(gridx, gridy, 6, gridz_define, style_lip, enable_zsnap, l_grid, div_base_x, div_base_y, style_hole, only_corners) {
53    cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, scoop_weight = 0);
54}
55translate ([0,0,shitfinity_bottom_padding+30]) cuboid([42*gridx,42*gridy,60]);
56}
57#difference(){
58cnst=3;
59translate ([0,0,shitfinity_bottom_padding/2+cnst/2+bottom_layer/2]) cuboid([42*gridx-shitfinity_inner_padding,42*gridy-shitfinity_inner_padding,shitfinity_bottom_padding-cnst-bottom_layer],rounding=r_f2,edges=[FRONT+LEFT,FRONT+RIGHT,BACK+LEFT,BACK+RIGHT]);
60translate ([0,0,shitfinity_bottom_padding/2+cnst/2+bottom_layer/2]) cuboid([42*gridx-shitfinity_inner_padding_thickness-shitfinity_inner_padding,42*gridy-shitfinity_inner_padding_thickness-shitfinity_inner_padding,shitfinity_bottom_padding-cnst-bottom_layer],rounding=r_f2-shitfinity_inner_padding_thickness,edges=[FRONT+LEFT,FRONT+RIGHT,BACK+LEFT,BACK+RIGHT]);
61}
62}
63} else {
64union(){
65difference(){
66gridfinityLite(gridx, gridy, 6, gridz_define, style_lip, enable_zsnap, l_grid, div_base_x, div_base_y, style_hole, only_corners) {
67    cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, scoop_weight = 0);
68}
69translate ([0,0,(3.8+6*7-shitfinity_top_padding)/2]) cuboid([42*gridx,42*gridy,3.8+6*7-shitfinity_top_padding]);
70}
71#translate([0,0,(3.8+6*7-shitfinity_top_padding)]) difference(){
72cnst=4;
73translate ([0,0,shitfinity_top_padding/2-cnst/2]) cuboid([42*gridx-shitfinity_inner_padding,42*gridy-shitfinity_inner_padding,shitfinity_top_padding-cnst],rounding=r_f2,edges=[FRONT+LEFT,FRONT+RIGHT,BACK+LEFT,BACK+RIGHT]);
74translate ([0,0,shitfinity_top_padding/2-cnst/2-1]) cuboid([42*gridx-shitfinity_inner_padding_thickness-shitfinity_inner_padding,42*gridy-shitfinity_inner_padding_thickness-shitfinity_inner_padding,shitfinity_top_padding-cnst+2],rounding=r_f2-shitfinity_inner_padding_thickness,edges=[FRONT+LEFT,FRONT+RIGHT,BACK+LEFT,BACK+RIGHT]);
75}
76}
77}